load("@fbcode_macros//build_defs/lib:rust_oss.bzl", "rust_oss")
load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_server_infra")

rust_library(
    name = "bundle_uri",
    srcs = glob([
        "src/**/*.rs",
        "schemas/**/*.sql",
    ]),
    test_deps = [
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:lazy_static",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = ([
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//configerator/structs/infrasec/if:acl-rust",
        "//eden/mononoke/server/context:context",
        "//crypto/cat/rust:cryptocat",
        "//eden/mononoke/common/rust/sql_ext:sql_ext",
        "//eden/mononoke/git/git_env:git_env",
        "//eden/mononoke/common/sql_construct:sql_construct",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//ti/urlgen:signing-if-rust",
        "//ti/urlgen/backends:if-rust",
        "//ti/urlgen/backends/manifold:if-rust",
        "//ti/urlgen/service:if-rust-clients",
        "//ti/urlgen/service:if-rust-srclients",
    ] + ([] if rust_oss.is_oss_build() else [
        "fbsource//third-party/rust:serde_json",
    ])),
)
